package com.liuke.study.thread;

/**
 * TODO
 *
 * @author wangjwy
 * @date 2019/10/22 14:37
 * @since 1.0.0
 */
public class Test5 {

	public static void main(String[] args) throws InterruptedException {
		new Thread(new Runnable() {
			@Override
			public void run() {
				while (true) {
					try {
						Thread.sleep(1);
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
					Thread.yield();
					System.out.println("*****************************");
				}
			}
		}).start();

		new Thread(new Runnable() {
			@Override
			public void run() {
				try {
					Thread.sleep(1);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
				System.out.println("####################################");
			}
		}).start();

		Thread.sleep(100000000);
	}


}
